﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UserSettings.cs" company="">
//   
// </copyright>
// <summary>
//   The user settings.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace TinyRadio.UserInterface.Models
{
    using System.Collections.Generic;
    using System.Configuration;

    using TinyRadio.Models;

    /// <summary>The user settings.</summary>
    public class UserSettings : ApplicationSettingsBase, IUserSettings
    {
        #region Public Properties

        /// <summary>Gets or sets the radio stations.</summary>
        [UserScopedSetting]
        public List<RadioStation> RadioStations
        {
            get
            {
                return (List<RadioStation>)this["RadioStations"];
            }

            set
            {
                this["RadioStations"] = value;
            }
        }

        /// <summary>Gets or sets the volume.</summary>
        [UserScopedSetting]
        [DefaultSettingValue("50")]
        public int Volume
        {
            get
            {
                return (int)this["Volume"];
            }

            set
            {
                this["Volume"] = value;
            }
        }

        #endregion

        #region Public Methods and Operators

        /// <summary>The save.</summary>
        public void Save()
        {
            this.Save();
        }

        #endregion
    }
}